package tool

import java.io.File
import scala.collection.mutable

/**
 * Created by yz on 16/9/2021
 */
object Pojo {

  case class AccountData(account: String)

  case class QData(q: String,page:Int,pageSize:Int)

  case class UserData(account: String, password: String)

  case class ChangePasswordData(password: String, newPassword: String)

  case class SampleNameData(sampleName: String)

  case class SampleData(id: Int, sampleName: String, describe: String)

  case class DescribeData(describe: String)

  case class MyMessage(valid: Boolean, message: String)

  case class IdsData(ids: List[Int])

  case class IdData(id: Int)

  case class RangeData(range: String)

  case class PathData(path: String)

  case class IdOpData(id: Option[Int])

  case class QueryData(method: String, queryText: String, db: String, evalue: String, wordSize: String, maxTargetSeqs: String)

  case class CommandData(workspace: File, commands: List[String])

  object CommandData {

    def empty: CommandData = {
      val workspace: File = new File("")
      val commands: List[String] = List[String]()
      CommandData(workspace, commands)
    }

    def apply(workspace: File, command: String): CommandData = {
      new CommandData(workspace, List(command))
    }

  }

  case class NameData(name: String)

  case class KindData(kind: String)

  case class MissionNameData(missionName: String)

  case class MissionData(missionName: String, missionIntro: String, db: String, trim5: String, trim3: String,
                         threadNum: Int)

  case class MissionDirData(workspaceDir: File, resultDir: File, logFile: File)

  case class MissionIdData(missionId: Int)

  case class FileNameData(fileName: String)

  case class ColumnNameData(columnName: String)

  case class MissionIdOptionData(missionId: Option[Int])

  case class GeneIdData(geneId: String)

  case class SpeciesData(species:String)

  case class GeneNameData(geneName: String)

  case class GeneTypeData(geneType: Option[String])

  case class TabOpData(tab: Option[String])

  case class GeneNameOpData(geneName: Option[String])

  case class RegionData(chr: String, start: Int, end: Int)

  case class KeywordData(keyword: String)

  case class KeywordInfo(remainKeywords: mutable.Buffer[String], map: Map[String, String])

  case class BlastData(queryText: Option[String], againstType: String, evalue: String, wordSize: String, maxTargetSeqs: String)

  case class RegionStrData(region: String)

  case class KeggEnrichData(geneId: Option[String], database: String, method: String, fdr: String, cutoff: String, pValue: String)

  case class MuscleData(queryText: Option[String], tree: String)

  case class SvgData(svgHtml: String)

  case class primerData(species: String, chr: String, start: String, end: String, SEQUENCE_TARGET: String, PRIMER_PRODUCT_SIZE_RANGE: String,
                        PRIMER_OPT_SIZE: String,
                        PRIMER_MAX_SIZE: String, PRIMER_MIN_SIZE: String, PRIMER_OPT_TM: String, PRIMER_MAX_TM: String,
                        PRIMER_MIN_TM: String, PRIMER_OPT_GC_PERCENT: String, PRIMER_MAX_GC: String, PRIMER_MIN_GC: String,
                        PRIMER_MAX_NS_ACCEPTED: String, PRIMER_MAX_POLY_X: String, PRIMER_INTERNAL_MAX_POLY_X: String,
                        PRIMER_MAX_SELF_ANY: String, PRIMER_MAX_SELF_END: String, PRIMER_PAIR_MAX_COMPL_ANY: String,
                        PRIMER_PAIR_MAX_COMPL_END: String)

  case class primerData2(method: String, queryText: String)

  case class MummerData(targetText: Option[String], queryText: Option[String])

  case class GeneWiseData(method: String, proteinSeq: String, geneId: String, dnaSeq: String, para: Boolean,
                          pretty: Boolean, genes: Boolean, trans: Boolean, cdna: Boolean, embl: Boolean, ace: Boolean,
                          gff: Boolean, diana: Boolean, init: String, splice: String, random: String, alg: String)

  case class PageData(limit: Int, offset: Int)

  case class KeysData(keys: List[String])

}
